package com.brainshare.system.domain;

import com.brainshare.common.enums.BuriedPointPathEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 *  埋点记录对象
 *  @author wll
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class BuriedPointPath {

    /** 版块 */
    private String section;

    /** 板块名称**/
    private String sectionName;

    /** 模块 */
    private String module;

    /** 模块名称*/
    private String moduleName;

    /** 功能 */
    private String function;

    /** 功能名称*/
    private String functionName;

    /**
     * 获取埋点路径列表
     * @return
     */
    public static List<BuriedPointPath> getBuriedPointList()
    {
       List<BuriedPointPath> list = new ArrayList<>();
       BuriedPointPath buriedPointPath = null;
        for (BuriedPointPathEnum buriedPointPathEnum : BuriedPointPathEnum.values()) {
            buriedPointPath = new BuriedPointPath();
            buriedPointPath.setSection(String.valueOf(buriedPointPathEnum.getSectionCode()));
            buriedPointPath.setSectionName(buriedPointPathEnum.getSectionDesc());
            buriedPointPath.setModule(String.valueOf(buriedPointPathEnum.getModuleCode()));
            buriedPointPath.setModuleName(buriedPointPathEnum.getModuleDesc());
            buriedPointPath.setFunction(String.valueOf(buriedPointPathEnum.getFunctionCode()));
            buriedPointPath.setFunctionName(buriedPointPathEnum.getFunctionDesc());
            list.add(buriedPointPath);
        }
        return list;
    }
}
